package org.example.model;

public class FruitItem {
    private final Fruit fruit;
    private final int weight;

    public FruitItem(Fruit fruit, int weight) {
        this.fruit = fruit;
        this.weight = weight;
    }

    public double calculatePrice() {
        return fruit.calculatePrice(weight);
    }
}
